﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.IO;

public partial class templateaspx_foundpassword : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        StringBuilder sb = new StringBuilder();

        string outHtml = File.ReadAllText(Server.MapPath("~/templateaspx/foundpassword.htm"), Encoding.UTF8);

        outHtml = outHtml.Replace("{#TQB.Temp.Head.Title#}", TQB.Temp.Head.Title);
        outHtml = outHtml.Replace("{#TQB.Temp.FoundPassword.Password#}", TQB.Temp.FoundPassword.Password);

        System.Reflection.Assembly o = System.Reflection.Assembly.GetExecutingAssembly();

        //System.Reflection.Assembly.Load("");

        //.CreateInstance("TQB.Temp.FoundPassword", false);

        Type type;

        type = o.GetType("TQB.Temp.FoundPassword");

        System.Reflection.MethodInfo mi = type.GetMethod("GetHtml");

        string result = (string)mi.Invoke(null, null);

        Response.Write(result);

        Label1.Text = outHtml;


    }
}

namespace TQB.Temp
{
    public class FoundPassword
    {
        public static string GetHtml()
        {
            return "ddd";
        }
        public static string Password { get { return "dddlajfj"; } }
    }

    public class Head
    {
        public static string Title = "test email";
    }
}